def fn():
    pass

_number = 10

class A:
    pass

class B:
    def __call__(self):
        pass

print(callable(fn)) # True
print(callable(_number)) # False

a = A()
b = B()
print(callable(a)) # False 内部没有__call__
print(callable(b)) # True 内部有__call__